package com.glb.gilibuy.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description:
 * @Author: Yingtian qian
 * @Date: 2021/8/2 15:32
 */
public class MapGenerator {
    public static Map<String, Object> getRes(Object status, Object msg) {
        Map<String, Object> res = new HashMap<>();
        res.put("status", status);
        res.put("msg", msg);
        return res;
    }

    public static Map<String, Object> getResWithData(Object status, Object msg, Object data) {
        Map<String, Object> res = new HashMap<>();
        res.put("status", status);
        res.put("msg", msg);
        res.put("data", data);
        return res;
    }

    public static Map<String, Object> getCode(Object identity, Object code) {
        Map<String, Object> res = new HashMap<>();
        res.put("identity", identity);
        res.put("code", code);
        return res;
    }
}
